﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AutoStar.Common
{
    [Serializable]
    public class Triangle3D
    {
        public Point3D normal;
        public Point3D p1;
        public Point3D p2;
        public Point3D p3;
        public float maxH;
        public float minH;

        public Triangle3D()
        {
            normal = new Point3D();
            p1 = new Point3D();
            p2 = new Point3D();
            p3 = new Point3D();
        }
        #region 如无引用可删除
        public Triangle3D(Point3D p1, Point3D p2, Point3D p3)
        {
            this.p1 = p1;
            this.p2 = p2;
            this.p3 = p3;
        }

        public List<Line3D> GetEdges()
        {
            List<Line3D> edges = new List<Line3D>
        {
            new Line3D(p1, p2),
            new Line3D(p2, p3),
            new Line3D(p3, p1)
        };
            return edges;
        }
        #endregion
    }
}
